package com.ruoyi.common.core.domain.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.joda.time.DateTime;

import javax.xml.crypto.Data;
import java.util.Date;

/**
 * 客户信息对象 jy_member
 *
 * @author ruoyi
 * @date 2021-10-22
 */
public class Member extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    private Long id;

    /** openId */
    @Excel(name = "openId")
    private String openId;

    private String unionId;

    /** $column.columnComment */
    @Excel(name = "nickName")
    private String nickName;

    /** $column.columnComment */
    @Excel(name = "phone")
    private String phone;

    /** 头像 */
    @Excel(name = "头像")
    private String headImg;

    /** 性别 */
    @Excel(name = "性别")
    private Integer gender;

    /** 帐号状态 */
    @Excel(name = "帐号状态")
    private String state;

    public String getIntegral() {
        return integral;
    }

    public void setIntegral(String integral) {
        this.integral = integral;
    }

    public String getReferrer() {
        return referrer;
    }

    public void setReferrer(String referrer) {
        this.referrer = referrer;
    }

    /** 积分 */
    @Excel(name = "积分")
    @ApiModelProperty(value = "积分")
    private String integral;

    /** 推荐人 */
    @Excel(name = "推荐人")
    @ApiModelProperty(value = "推荐人")
    private String referrer;

    /** 店员或者商家id */
    private Long storeUserId;

    /**
     * 绑定为下级本地路径
     */
    private String belowImageLocal;
    /**
     * 绑定为下级二维码url
     */
    private String belowImageUrl;
    /**
     * 绑定为下级二维码路径
     */
    private String belowPage;
    /**
     * 普通用户上级
     */
    private Long parentMemberId;

    /**
     * 是否为vip
     */
    private String isVip;

    /**
     * vip到期时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date vipEndDate;

    public String getUnionId() {
        return unionId;
    }

    public void setUnionId(String unionId) {
        this.unionId = unionId;
    }

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setOpenId(String openId)
    {
        this.openId = openId;
    }

    public String getOpenId()
    {
        return openId;
    }
    public void setNickName(String nickName)
    {
        this.nickName = nickName;
    }

    public String getNickName()
    {
        return nickName;
    }
    public void setPhone(String phone)
    {
        this.phone = phone;
    }

    public String getPhone()
    {
        return phone;
    }
    public void setHeadImg(String headImg)
    {
        this.headImg = headImg;
    }

    public String getHeadImg()
    {
        return headImg;
    }
    public void setGender(Integer gender)
    {
        this.gender = gender;
    }

    public Integer getGender()
    {
        return gender;
    }
    public void setState(String state)
    {
        this.state = state;
    }

    public String getState()
    {
        return state;
    }

    public void setStoreUserId(Long storeUserId)
    {
        this.storeUserId = storeUserId;
    }
    public Long getStoreUserId()
    {
        return storeUserId;
    }

    public String getBelowImageLocal() {
        return belowImageLocal;
    }
    public void setBelowImageLocal(String belowImageLocal) { this.belowImageLocal = belowImageLocal; }

    public String getBelowImageUrl() {
        return belowImageUrl;
    }
    public void setBelowImageUrl(String belowImageUrl) {
        this.belowImageUrl = belowImageUrl;
    }

    public String getBelowPage() {
        return belowPage;
    }
    public void setBelowPage(String belowPage) {
        this.belowPage = belowPage;
    }

    public void setParentMemberId(Long parentMemberId)
    {
        this.parentMemberId = parentMemberId;
    }
    public Long getParentMemberId()
    {
        return parentMemberId;
    }

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public String getIsVip() {
        return isVip;
    }

    public void setIsVip(String isVip) {
        this.isVip = isVip;
    }

    public Date getVipEndDate() {
        return vipEndDate;
    }

    public void setVipEndDate(Date vipEndDate) {
        this.vipEndDate = vipEndDate;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("openId", getOpenId())
            .append("nickName", getNickName())
            .append("phone", getPhone())
            .append("headImg", getHeadImg())
            .append("integral", getIntegral())
            .append("referrer", getReferrer())
            .append("gender", getGender())
            .append("state", getState())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
